import { defineConfig } from 'windicss/helpers'

export default defineConfig({
  // 扫描文件路径
  extract: {
    include: ['src/**/*.{vue,html,jsx,tsx,ts,js}'],
    exclude: ['node_modules', '.git']
  },
  
  // 主题配置
  theme: {
    extend: {
      // 自定义颜色
      colors: {
        primary: {
          50: '#eff6ff',
          100: '#dbeafe',
          200: '#bfdbfe',
          300: '#93c5fd',
          400: '#60a5fa',
          500: '#3b82f6',
          600: '#2563eb',
          700: '#1d4ed8',
          800: '#1e40af',
          900: '#1e3a8a',
        },
        steel: {
          50: '#f8fafc',
          100: '#f1f5f9',
          200: '#e2e8f0',
          300: '#cbd5e1',
          400: '#94a3b8',
          500: '#64748b',
          600: '#475569',
          700: '#334155',
          800: '#1e293b',
          900: '#0f172a',
        }
      },
      
      // 自定义间距
      spacing: {
        '18': '4.5rem',
        '88': '22rem',
      },
      
      // 自定义字体
      fontFamily: {
        'sans': ['Inter', 'system-ui', 'sans-serif'],
        'mono': ['Fira Code', 'monospace'],
      },
      
      // 自定义阴影
      boxShadow: {
        'steel': '0 4px 6px -1px rgba(71, 85, 105, 0.1), 0 2px 4px -1px rgba(71, 85, 105, 0.06)',
        'steel-lg': '0 10px 15px -3px rgba(71, 85, 105, 0.1), 0 4px 6px -2px rgba(71, 85, 105, 0.05)',
      }
    }
  },
  
  // 插件配置
  plugins: [
    require('windicss/plugin/typography'),
    require('windicss/plugin/aspect-ratio'),
    require('windicss/plugin/line-clamp'),
  ],
  
  // 快捷方式
  shortcuts: {
    // 布局相关
    'flex-center': 'flex items-center justify-center',
    'flex-between': 'flex items-center justify-between',
    'flex-col-center': 'flex flex-col items-center justify-center',
    
    // 卡片样式
    'card': 'bg-white rounded-lg shadow-sm border border-gray-200',
    'card-hover': 'card hover:shadow-md transition-shadow duration-200',
    
    // 按钮样式
    'btn': 'px-4 py-2 rounded-md font-medium transition-colors duration-200',
    'btn-primary': 'btn bg-primary-600 text-white hover:bg-primary-700',
    'btn-secondary': 'btn bg-gray-200 text-gray-900 hover:bg-gray-300',
    
    // 输入框样式
    'input': 'w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent',
    
    // 文本样式
    'text-title': 'text-2xl font-bold text-gray-900',
    'text-subtitle': 'text-lg font-semibold text-gray-700',
    'text-body': 'text-sm text-gray-600',
    'text-caption': 'text-xs text-gray-500',
  }
})